^ ()
   HOME

TheInfoList



OR:

Caret () is the name used familiarly for the character provided on most
QWERTY QWERTY ( ) is a keyboard layout for Latin-script alphabets. The name comes from the order of the first six Computer keyboard keys#Types, keys on the top letter row of the keyboard: . The QWERTY design is based on a layout included in the Sh ...
keyboards by typing . The symbol has a variety of uses in programming and mathematics. The name "caret" arose from its visual similarity to the original proofreader's caret, , a mark used in
proofreading Proofreading is a phase in the process of publishing where galley proofs are compared against the original manuscripts or graphic artworks, to identify transcription errors in the typesetting process. In the past, proofreaders would place corr ...
to indicate where a punctuation mark, word, or phrase should be inserted into a document. The
ASCII ASCII ( ), an acronym for American Standard Code for Information Interchange, is a character encoding standard for representing a particular set of 95 (English language focused) printable character, printable and 33 control character, control c ...
standard (X3.64.1977) calls it a "
circumflex The circumflex () is a diacritic in the Latin and Greek scripts that is also used in the written forms of many languages and in various romanization and transcription schemes. It received its English name from "bent around"a translation of ...
"; the Unicode standard calls it a "circumflex accent", although it is no longer practicable for that purpose.


History


Typewriters

On typewriters designed for languages that routinely use
diacritic A diacritic (also diacritical mark, diacritical point, diacritical sign, or accent) is a glyph added to a letter or to a basic glyph. The term derives from the Ancient Greek (, "distinguishing"), from (, "to distinguish"). The word ''diacrit ...
s (accent marks), there are two possible ways to type these: keys can be dedicated to
precomposed character A precomposed character (alternatively composite character or decomposable character) is a Unicode entity that can also be defined as a sequence of one or more other characters. A precomposed character may typically represent a letter with a diac ...
s (with the diacritic included); alternatively a
dead key A dead key is a special kind of modifier key on a mechanical typewriter, or computer keyboard, that is typically used to attach a specific diacritic to a base letter (alphabet), letter. The dead key does not generate a (complete) grapheme, charact ...
mechanism can be provided. With the latter, a mark is made when a dead key is typed but, unlike normal keys, the paper carriage does not move on and thus the next letter to be typed is printed under the accent. The symbol was originally provided in typewriters and computer printers so that circumflex accents could be overprinted on letters (as in or ).


Transposition into ISO/IEC 646 and ASCII

The incorporation of the circumflex symbol into ASCII is a consequence of this prior existence on typewriters: this symbol did not exist independently as a
type Type may refer to: Science and technology Computing * Typing, producing text via a keyboard, typewriter, etc. * Data type, collection of values used for computations. * File type * TYPE (DOS command), a command to display contents of a file. * ...
or hot-lead printing character. The original 1963 version of the ASCII standard used the code point for an . However, the 1965 standard defined code point as one of five available for national variation, with the circumflex diacritic as the default and the up-arrow as one of the alternative uses. In 1967, the second revision of ASCII followed suit. Overprinting to add an accent mark was not always supported well by printers, and was almost never possible on video terminals. The freestanding circumflex (which had come to be called a caret) quickly became reused for many other purposes, such as in
computer language A computer language is a formal language used to communicate with a computer. Types of computer languages include: * Software construction#Construction languages, Construction language – all forms of communication by which a human can Comput ...
s and mathematical notation. As the mark did not need to fit above a letter any more, it became larger in appearance such that it can no longer be used to overprint an accent in most fonts. Support for accented characters eventually became to be provided by including
precomposed character A precomposed character (alternatively composite character or decomposable character) is a Unicode entity that can also be defined as a sequence of one or more other characters. A precomposed character may typically represent a letter with a diac ...
s in character sets, rather than by using overprinting. In
Unicode Unicode or ''The Unicode Standard'' or TUS is a character encoding standard maintained by the Unicode Consortium designed to support the use of text in all of the world's writing systems that can be digitized. Version 16.0 defines 154,998 Char ...
the symbol is encoded as ; in
HTML Hypertext Markup Language (HTML) is the standard markup language for documents designed to be displayed in a web browser. It defines the content and structure of web content. It is often assisted by technologies such as Cascading Style Sheets ( ...
it may be used directly or inserted with . The
combining character In digital typography, combining characters are Character (computing), characters that are intended to modify other characters. The most common combining characters in the Latin script are the combining diacritic, diacritical marks (including c ...
for use as a diacritic is , although
precomposed character A precomposed character (alternatively composite character or decomposable character) is a Unicode entity that can also be defined as a sequence of one or more other characters. A precomposed character may typically represent a letter with a diac ...
s (like ) are available for most European languages.


Uses


Programming languages

The symbol has many uses in
programming language A programming language is a system of notation for writing computer programs. Programming languages are described in terms of their Syntax (programming languages), syntax (form) and semantics (computer science), semantics (meaning), usually def ...
s, where it is typically called a caret. It can signify
exponentiation In mathematics, exponentiation, denoted , is an operation (mathematics), operation involving two numbers: the ''base'', , and the ''exponent'' or ''power'', . When is a positive integer, exponentiation corresponds to repeated multiplication ...
, the bitwise XOR operator, string concatenation, and
control character In computing and telecommunications, a control character or non-printing character (NPC) is a code point in a character encoding, character set that does not represent a written Character (computing), character or symbol. They are used as in-ba ...
s in
caret notation Caret notation is a notation for control characters in ASCII. The notation assigns to control-code 1, sequentially through the alphabet to assigned to control-code 26 (0x1A). For the control-codes outside of the range 1–26, the ...
, among other uses. In
regular expression A regular expression (shortened as regex or regexp), sometimes referred to as rational expression, is a sequence of characters that specifies a match pattern in text. Usually such patterns are used by string-searching algorithms for "find" ...
s, the caret is used to match the beginning of a string or line; if it begins a character class, then the inverse of the class is to be matched.
ANSI C ANSI C, ISO C, and Standard C are successive standards for the C programming language published by the American National Standards Institute (ANSI) and ISO/IEC JTC 1/SC 22/WG 14 of the International Organization for Standardization (ISO) and the ...
can transcribe the caret in the form of the trigraph , as the character was originally not available in all character sets and keyboards. C++ additionally supports tokens like (for ) and (for ) to avoid the character altogether. recommends that the character be transcribed as digraph when required. Pascal uses the caret for declaring and dereferencing pointers. In
Smalltalk Smalltalk is a purely object oriented programming language (OOP) that was originally created in the 1970s for educational use, specifically for constructionist learning, but later found use in business. It was created at Xerox PARC by Learni ...
, the caret is the method return statement. In
C++/CLI C++/CLI is a variant of the C++ programming language, modified for Common Language Infrastructure. It has been part of Visual Studio 2005 and later, and provides interoperability with other .NET languages such as C#. Microsoft created C++/CLI ...
, .NET reference types are accessed through a handle using the syntax. In Apple's C extensions for Mac OS X and iOS, carets are used to create blocks and to denote block types. Go uses it as a
bitwise NOT In computer programming, a bitwise operation operates on a bit string, a bit array or a binary numeral (considered as a bit string) at the level of its individual bits. It is a fast and simple action, basic to the higher-level arithmetic operatio ...
operator. Node.js uses the caret in package.json files to signify dependency resolution behavior being used for each particular dependency. In the case of Node.js, a caret allows any kind of update, unless it is seen as a "major" update as defined by semver.


Surrogate symbol for superscript and exponentiation

In
mathematics Mathematics is a field of study that discovers and organizes methods, Mathematical theory, theories and theorems that are developed and Mathematical proof, proved for the needs of empirical sciences and mathematics itself. There are many ar ...
, the caret can signify
exponentiation In mathematics, exponentiation, denoted , is an operation (mathematics), operation involving two numbers: the ''base'', , and the ''exponent'' or ''power'', . When is a positive integer, exponentiation corresponds to repeated multiplication ...
(e.g. 3^5 for ) where the usual
superscript A subscript or superscript is a character (such as a number or letter) that is set slightly below or above the normal line of type, respectively. It is usually smaller than the rest of the text. Subscripts appear at or below the baseline, wh ...
is not readily usable (as on some
graphing calculator Graphing Calculator may refer to: * Graphing calculators, calculators that are able to display and/or analyze mathematical function graphs * NuCalc, a computer software program able to perform many graphing calculator functions * Grapher, th ...
s). It is also used to indicate a superscript in
TeX Tex, TeX, TEX, may refer to: People and fictional characters * Tex (nickname), a list of people and fictional characters with the nickname * Tex Earnhardt (1930–2020), U.S. businessman * Joe Tex (1933–1982), stage name of American soul singer ...
typesetting. The use of the caret for exponentiation can be traced back to
ALGOL 60 ALGOL 60 (short for ''Algorithmic Language 1960'') is a member of the ALGOL family of computer programming languages. It followed on from ALGOL 58 which had introduced code blocks and the begin and end pairs for delimiting them, representing a ...
, which expressed the exponentiation operator as an upward-pointing arrow, intended to evoke the superscript notation common in mathematics. The upward-pointing arrow is now used to signify hyperoperations in
Knuth's up-arrow notation In mathematics, Knuth's up-arrow notation is a method of notation for very large integers, introduced by Donald Knuth in 1976. In his 1947 paper, R. L. Goodstein introduced the specific sequence of operations that are now called ''hyperoperatio ...
, with a single arrow representing exponentiation and multiple adjacent arrows representing higher-level operations.


Escape character

It is often seen in
caret notation Caret notation is a notation for control characters in ASCII. The notation assigns to control-code 1, sequentially through the alphabet to assigned to control-code 26 (0x1A). For the control-codes outside of the range 1–26, the ...
to show control characters: for instance, means the control character with value 1. The Windows command-line interpreter ( cmd.exe) uses the caret to escape reserved characters (most other shells use the
backslash The backslash is a mark used mainly in computing and mathematics. It is the mirror image of the common slash (punctuation), slash . It is a relatively recent mark, first documented in the 1930s. It is sometimes called a hack, whack, Escape c ...
). For example, to pass a 'less-than' sign as an argument to a program, one would type .


Upward-pointing arrow

In internet forums, on
social networking sites A social networking service (SNS), or social networking site, is a type of online social media platform which people use to build social networks or social relationships with other people who share similar personal or career content, interests ...
such as Facebook, or in
online chat Online chat is any direct text-, audio- or video-based (webcams), one-on-one or one-to-many ( group) chat (formally also known as synchronous conferencing), using tools such as instant messengers, Internet Relay Chat (IRC), talkers and possi ...
s, one or more carets may be used beneath the text of another post, representing an upward-pointing arrow to that post; in addition to the arrow usage, it can also mean that the user who posted the ^ agrees with the above post. Multiple carets may be used to indicate that the comment is replying to, or relating to, the post above that correlates with the number of carets used, or to "underscore" the correct portion of the previous post, or simply for emphasis. A similar use has been adopted by programming language
compiler In computing, a compiler is a computer program that Translator (computing), translates computer code written in one programming language (the ''source'' language) into another language (the ''target'' language). The name "compiler" is primaril ...
s, such as the Java compiler, to point out where a compilation error has occurred. The compiler prints out the faulty line of code and uses a single caret on the next line, padded by spaces, to give a visual indication of the error location.


See also

*
Caret Caret () is the name used familiarly for the character provided on most QWERTY keyboards by typing . The symbol has a variety of uses in programming and mathematics. The name "caret" arose from its visual similarity to the original proofre ...
as used in
proofreading Proofreading is a phase in the process of publishing where galley proofs are compared against the original manuscripts or graphic artworks, to identify transcription errors in the typesetting process. In the past, proofreaders would place corr ...
and
typography Typography is the art and technique of Typesetting, arranging type to make written language legibility, legible, readability, readable and beauty, appealing when displayed. The arrangement of type involves selecting typefaces, Point (typogra ...
*
Hat operator A "hat" (circumflex (ˆ)), placed over a symbol is a mathematical notation with various uses. Estimated value In statistics, a circumflex (ˆ), called a "hat", is used to denote an estimator or an estimated value. For example, in the context o ...
, a notation used in mathematics and statistics, is sometimes called a caret


Notes


References

{{Reflist, refs= {{cite web , title = What is Caret? , url = http://www.computerhope.com/jargon/c/caret.htm , publisher = Computer Hope, access-date = 14 August 2012 {{cite web , url = http://www.worldpowersystems.com/projects/codes/index.html#UP , title = ASCII: American Standard Code for Information Infiltration , author = Tom Jennings , access-date = 14 September 2010 , archive-url = https://web.archive.org/web/20140821121342/http://www.worldpowersystems.com/projects/codes/index.html#UP , archive-date = 21 August 2014 , url-status = dead {{cite web, url = https://jkorpela.fi/kirjaimet/tarinoita.pdf , title = Kirjainten tarinoita , author = Jukka K. Korpela , pages = 132–133 , date = 18 January 2010 , access-date = 14 September 2010 , language = fi {{cite web , url = http://unicode.org/charts/PDF/U0250.pdf , title = IPA Extensions , author = Unicode , date = 1991–2012 , access-date = 20 August 2012 {{cite web , url = http://mathworld.wolfram.com/Caret.html , title = Caret , author = Eric W. Weisstein , work = MathWorld , publisher = Wolfram , access-date = 20 August 2012 Typographical symbols